package com.md.api.dao;

import com.md.api.entity.MotOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface MotOrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MotOrder record);

    MotOrder selectByPrimaryKey(Integer id);

    List<MotOrder> selectAll();

    int updateOrder(MotOrder record);

    List<MotOrder> list(@Param("userId") String userId, @Param("siteId") String siteId,@Param("isWriteOff") Integer isWriteOff,
                        @Param("motType") Integer motType, @Param("status") Integer status,
                        @Param("payTimeStart") String payTimeStart,@Param("payTimeEnd") String payTimeEnd,@Param("siteName") String siteName);
    List<MotOrder> siteList(@Param("userId") String userId, @Param("siteId") String siteId,@Param("isWriteOff") Integer isWriteOff,
                        @Param("motType") Integer motType, @Param("status") Integer status,
                        @Param("payTimeStart") String payTimeStart,@Param("payTimeEnd") String payTimeEnd);

    MotOrder getByMotNo(@Param("motNo")String motNo);

    void hasEvaluate(@Param("motNo")String motNo);

    List<MotOrder> getByCarId(@Param("carId")String carId);

    List<MotOrder> getByUserId(@Param("userId")String userId, @Param("status")Integer status,
                               @Param("payTimeStart")  String payTimeStart, @Param("payTimeEnd")  String payTimeEnd);
}